import { AppRouteRecordRaw } from '@/types/route'
import { shallowRef } from 'vue'
import Layout from '@/layout/index.vue'

export let bpaiRouter: AppRouteRecordRaw[] = [
  {
    path: '/bpaiUser',
    name: 'bpaiUser',
    component: shallowRef(Layout),
    meta: {
      title: '用户中心',
      icon: 'icon-yonghuzhongxin'
    },
    children: [
      {
        path: '/bpaiUser/userList',
        component: () => import(/* webpackChunkName: "bpai" */ '@/views/bpai/user/userList.vue'),
        name: 'userList',
        meta: { title: '用户管理' }
      },
      {
        path: '/bpaiUser/orderList',
        component: () => import(/* webpackChunkName: "bpai" */ '@/views/bpai/order/orderList.vue'),
        name: 'orderList',
        meta: { title: '订单管理' }
      }
    ]
  },
  {
    path: '/bpaiChannel',
    name: 'bpaiChannel',
    component: shallowRef(Layout),
    meta: {
      title: '渠道管理',
      icon: 'icon-qudaoguanli'
    },
    children: [
      {
        path: '/bpaiChannel/channelSet',
        component: () => import(/* webpackChunkName: "bpai" */ '@/views/bpai/channel/channelSet.vue'),
        name: 'channelSet',
        meta: { title: '渠道配置' }
      },
      {
        path: '/bpaiChannel/shareManage',
        component: () => import(/* webpackChunkName: "bpai" */ '@/views/system/share/shareManage.vue'),
        name: 'shareManage',
        meta: { title: '活动管理' }
      }
    ]
  },
  {
    path: '/bpaiAnalysis',
    name: 'bpaiAnalysis',
    component: shallowRef(Layout),
    meta: {
      title: '统计分析',
      icon: 'icon-tongjifenxi_icon'
    },
    children: [
      {
        path: '/bpaiAnalysis/userDetail',
        component: () => import(/* webpackChunkName: "bpai" */ '@/views/bpai/analysis/user/userDetail.vue'),
        name: 'userDetail',
        meta: { title: '用户使用明细' }
      },
      {
        path: '/bpaiAnalysis/chatDetail',
        component: () => import(/* webpackChunkName: "bpai" */ '@/views/bpai/analysis/chat/chatDetail.vue'),
        name: 'chatDetail',
        meta: { title: '咨询问题明细' }
      }
    ]
  }
]

export default bpaiRouter
